package org.nearby.note.utils;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;
/*
 * props文件操作
 */
public class props {
    private static final String config_file = "config.properties";

    public static String get(String key) {
        try {
            Properties p = new Properties();
            InputStream in;
            in = new BufferedInputStream(new FileInputStream(new File(config_file)));
            p.load(in);
            return p.getProperty(key);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
